home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -websites- / wirenet / files / thor25_arexx.lha / Examples / ConfData.br < prev    next >
Text File  |  1997-05-28  |  8KB  |  148 lines

  1. /*  ConfData.br
  2.  *
  3.  *  Shows all data about a conference.
  4.  *  
  5.  *  Script by: Eivind Nordseth, Ultima Thule Software.
  6.  *
  7.  *  Display of conference types added by Eirik Synnes
  8.  * 
  9.  */
  10.  
  11. /*    trace results */
  12.  
  13.     if ~show('p', 'BBSREAD') then do
  14.         address command
  15.             "run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead"
  16.             "WaitForPort BBSREAD"
  17.     end
  18.  
  19.     address "BBSREAD"
  20.  
  21.     parse arg argument
  22.  
  23.     if(argument = '') then
  24.     do
  25.         say '$VER: ConfData.br 4.2 (22.5.97)'
  26.         say 'Template: BBSNAME/A,CONFNAME/A'
  27.         exit
  28.     end
  29.  
  30.     /* Bit numbers for conference data */
  31.  
  32.     CDB_MEMBER_OF           = 0   /* Member of this conference. */
  33.     CDB_MAIL                = 1   /* Private mail conference. */
  34.     CDB_READ_ONLY           = 2   /* Read only conference. */
  35.     CDB_COMPULSORY          = 3   /* Compulsory conference. */
  36.     CDB_FILE_INFO           = 4   /* File info conference. */
  37.     CDB_USER_INFO           = 5   /* User info conference. */
  38.     CDB_PRIVATE_ALLOWED     = 6   /* Private messages allowed. */
  39.     CDB_ENTER_ONLY_TO_ALL   = 7   /* Enter only allowed to ALL. */
  40.     CDB_ALIAS               = 8   /* Alias conference. */
  41.     CDB_BBS_KEEPMSG         = 9   /* Use bbs KeepMsg. */
  42.     CDB_BBS_KEEPTIME        = 10  /* Use bbs KeepTime. */
  43.     CDB_IGNORE_KEEPMSG      = 11  /* Don't count messages when packing conference. */
  44.     CDB_IGNORE_KEEPTIME     = 12  /* Don't check time when packing conference. */
  45.     CDB_NO_XPK_METHOD       = 13  /* Don't use any xpk method. */
  46.     CDB_NO_SIGNATURE        = 14  /* Don't use signatures. */
  47.     CDB_NOT_ON_BBS          = 15  /* This conference is not on the bbs. */
  48.     CDB_NO_TAGS             = 16  /* Don't use tags. */
  49.     CDB_REPLY_ONLY_TO_ALL   = 17  /* Replies should be adresses to all. */ 
  50.     CDB_NO_LINEWRAP_DISPLAY = 18  /* Don't line wrap messages in this conference when they are displayed. */
  51.     CDB_FILE_SIGNATURE      = 19  /* The Signature field contains the path and name of a file containing the signature. */
  52.     CDB_AUTO_XPK_PACK       = 20  /* Automatically xpk pack new messages when they are written to this conference. NB: A xpk method must have been defined. */
  53.     CDB_NO_AUTO_XPK_PACK    = 21  /* No automatically xpk packing in this conference. */
  54.     CDB_MARK_OWN_MSGS       = 22  /* Also mark messages from user when adding messages. */
  55.     CDB_COMMAND_SIGNATURE   = 23  /* The signature field contains the path and name of a command. When the command is executed should the signature contents be written to stdout. The template for the command is expected to be BBSNAME/K,CONFNAME/K. */
  56.     CDB_REFLOW_QUOTING      = 24  /* Reflow quoting should be on as default when answering messages. This flag should only be considered when cd_QuoteType is != QT_USE_SUPER. */
  57.     CDB_ALWAYS_REPLY_STR    = 25  /* Use reply string on all replies. This flag should only be considered when cd_ReplyString is non NULL. */
  58.     CDB_NO_REPLY_STR        = 26  /* Don't use reply strings in this conf. Overrides the setting of cd_ReplyString. */
  59.     CDB_BBS_REPLY_STR       = 27  /* Use bbs reply string settings. Overrides all other conference reply string settings. */
  60.     CDB_NO_CONF_ENTER_SCR   = 28  /* Don't use a conference enter script in this conference. */
  61.     CDB_NO_CONF_LEAVE_SCR   = 29  /* Don't use a conference leave script on this conference. */
  62.     CDB_FORCE_PACK_REWRITE  = 30  /* Force a rewrite next time this conference is packed. If the packing succeed, the flag will be cleared. */
  63.     CDB_ATTACH_FORBIDDEN    = 31  /* User may not attach files in this conference.    */
  64.  
  65.     /* Defined values for CONFDATA.CONFNETTYPE */
  66.  
  67.     CDNT_NONET      = 0  /* This conference is a local conference. This is the default values for new conferences. */
  68.     CDNT_FIDONET    = 1  /* This conference is a Fido net conference. */
  69.     CDNT_USENET     = 2  /* This conference is a usenet conference. */
  70.     CDNT_MAILFOLDER = 3     /* This conference is a virtual mail folder */
  71.     CDNT_INFO       = 4  /* This conference is an information conference */
  72.  
  73.     GETCONFDATA argument stem CONFDATA
  74.     if(rc ~= 0) then 
  75.     do
  76.         say BBSREAD.LASTERROR
  77.         exit
  78.     end
  79.  
  80.     say 'Name:       ' CONFDATA.NAME
  81.     say 'KeepMsg:    ' CONFDATA.KEEPMSG
  82.     say 'KeepTime:   ' CONFDATA.KEEPTIME
  83.     say 'Signature:  ' CONFDATA.SIGNATURE
  84.     say 'Alias:      ' CONFDATA.ALIAS
  85.     say 'BBSConfNr:  ' CONFDATA.BBSCONFNR
  86.     say 'LineLength: ' CONFDATA.LINELENGTH
  87.     say 'CharSet:    ' CONFDATA.CHARSET
  88.     say 'XPKMethod:  ' CONFDATA.XPKMETHOD
  89.     say 'TagFile:    ' CONFDATA.TAGFILE
  90.     say 'EMailAddr:  ' CONFDATA.EMAILADDR
  91.     say 'ReplyString:' CONFDATA.REPLYSTRING
  92.     say 'QuoteType:  ' CONFDATA.QUOTETYPE
  93.     say 'QuoteChars: ' CONFDATA.QUOTECHARS
  94.     say 'EnterScript:' CONFDATA.ENTERSCRIPT
  95.     say 'LeaveScript:' CONFDATA.LEAVESCRIPT
  96.  
  97.     cf = ''
  98.     if bittst(CONFDATA.FLAGS,CDB_MEMBER_OF)           then cf = cf || 'MEMBER_OF '
  99.     if bittst(CONFDATA.FLAGS,CDB_MAIL)                then cf = cf || 'MAIL '
  100.     if bittst(CONFDATA.FLAGS,CDB_READ_ONLY)           then cf = cf || 'READ_ONLY '
  101.     if bittst(CONFDATA.FLAGS,CDB_COMPULSORY)          then cf = cf || 'COMPULSORY '
  102.     if bittst(CONFDATA.FLAGS,CDB_FILE_INFO)           then cf = cf || 'FILE_INFO '
  103.     if bittst(CONFDATA.FLAGS,CDB_USER_INFO)           then cf = cf || 'USER_INFO '
  104.     if bittst(CONFDATA.FLAGS,CDB_PRIVATE_ALLOWED)     then cf = cf || 'PRIVATE_ALLOWED '
  105.     if bittst(CONFDATA.FLAGS,CDB_ENTER_ONLY_TO_ALL)   then cf = cf || 'ENTER_ONLY_TO_ALL '
  106.     if bittst(CONFDATA.FLAGS,CDB_ALIAS)               then cf = cf || 'ALIAS '
  107.     if bittst(CONFDATA.FLAGS,CDB_BBS_KEEPMSG)         then cf = cf || 'BBS_KEEPMSG '
  108.     if bittst(CONFDATA.FLAGS,CDB_BBS_KEEPTIME)        then cf = cf || 'BBS_KEEPTIME '
  109.     if bittst(CONFDATA.FLAGS,CDB_IGNORE_KEEPMSG)      then cf = cf || 'IGNORE_KEEPMSG '
  110.     if bittst(CONFDATA.FLAGS,CDB_IGNORE_KEEPTIME)     then cf = cf || 'IGNORE_KEEPTIME '
  111.     if bittst(CONFDATA.FLAGS,CDB_NO_XPK_METHOD)       then cf = cf || 'NO_XPK_METHOD '
  112.     if bittst(CONFDATA.FLAGS,CDB_NO_SIGNATURE)        then cf = cf || 'NO_SIGNATURE '
  113.     if bittst(CONFDATA.FLAGS,CDB_NOT_ON_BBS)          then cf = cf || 'NOT_ON_BBS '
  114.     if bittst(CONFDATA.FLAGS,CDB_NO_TAGS)             then cf = cf || 'NO_TAGS '
  115.     if bittst(CONFDATA.FLAGS,CDB_REPLY_ONLY_TO_ALL)   then cf = cf || 'REPLY_ONLY_TO_ALL '
  116.     if bittst(CONFDATA.FLAGS,CDB_NO_LINEWRAP_DISPLAY) then cf = cf || 'NO_LINEWRAP_DISPLAY '
  117.     if bittst(CONFDATA.FLAGS,CDB_FILE_SIGNATURE)      then cf = cf || 'FILE_SIGNATURE '
  118.     if bittst(CONFDATA.FLAGS,CDB_AUTO_XPK_PACK)       then cf = cf || 'AUTO_XPK_PACK '
  119.     if bittst(CONFDATA.FLAGS,CDB_NO_AUTO_XPK_PACK)    then cf = cf || 'NO_AUTO_XPK_PACK '
  120.     if bittst(CONFDATA.FLAGS,CDB_MARK_OWN_MSGS)       then cf = cf || 'MARK_OWN_MSGS '
  121.     if bittst(CONFDATA.FLAGS,CDB_COMMAND_SIGNATURE)   then cf = cf || 'COMMAND_SIGNATURE '
  122.     if bittst(CONFDATA.FLAGS,CDB_REFLOW_QUOTING)      then cf = cf || 'REFLOW_QUOTING '
  123.     if bittst(CONFDATA.FLAGS,CDB_ALWAYS_REPLY_STR)    then cf = cf || 'ALWAYS_REPLY_STR '
  124.     if bittst(CONFDATA.FLAGS,CDB_NO_REPLY_STR)        then cf = cf || 'NO_REPLY_STR '
  125.     if bittst(CONFDATA.FLAGS,CDB_BBS_REPLY_STR)       then cf = cf || 'BBS_REPLY_STR '
  126.     if bittst(CONFDATA.FLAGS,CDB_NO_CONF_ENTER_SCR)   then cf = cf || 'NO_CONF_ENTER_SCR '
  127.     if bittst(CONFDATA.FLAGS,CDB_NO_CONF_LEAVE_SCR)   then cf = cf || 'NO_CONF_LEAVE_SCR '
  128.  
  129.     do w=4 to words(cf) by 4
  130.         cf    = subword(cf, 1, w) || '0a'x || '             ' || subword(cf, w + 1)
  131.     end
  132.  
  133.     say 'Flags:      ' cf
  134.  
  135.     if CONFDATA.CONFNETTYPE = CDNT_NONET      then ct = 'NONET'
  136.     if CONFDATA.CONFNETTYPE = CDNT_FIDONET    then ct = 'FIDONET'
  137.     if CONFDATA.CONFNETTYPE = CDNT_USENET     then ct = 'USENET'
  138.     if CONFDATA.CONFNETTYPE = CDNT_MAILFOLDER then ct = 'MAILFOLDER'
  139.     if CONFDATA.CONFNETTYPE = CDNT_INFO       then ct = 'INFO'
  140.  
  141.     say 'ConfNetType:' ct
  142.  
  143.     say 'FirstMsg:   ' CONFDATA.FIRSTMSG
  144.     say 'LastMsg:    ' CONFDATA.LASTMSG
  145.     say 'NumMessages:' CONFDATA.NUMMESSAGES
  146.     say 'MsgMarked:  ' CONFDATA.MSGMARKED
  147.     say 'Marked2User:' CONFDATA.MARKED2USER
  148.